package router

import (
	"database/sql"

	"gitee.com/hp-huiw/family-expense-api/internal/handler"
	"github.com/gin-gonic/gin"
)

// Sets routes for file resource.
func SetFileRoutes(routerGroup *gin.RouterGroup, db *sql.DB) {
	h := handler.NewFileHandler(db)

	routerGroup.POST("/upload-own-avatar-by-base64", h.UploadOwnAvatarByBase64)
	routerGroup.POST("/upload-own-avatar", h.UploadOwnAvatar)
	routerGroup.POST("/upload-avatar", h.UploadAvatar)
	routerGroup.POST("/upload", h.Upload)
}
